<?php

namespace app\common\model;

class Withdraw extends BaseModel
{
    protected $append = ['status_name'];

    public function getStatusNameAttr($value,$data)
    {
        $temp = [-2=>'已拒绝',-1=>'审核中',1=>'打款中',2=>'已打款'];
        return $temp[$data['status']] ?? '';
    }
    
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}